package com.lq.common.controller;

import com.lq.common.entity.UserInfo;
import com.lq.common.param.ResponseParam;
import com.lq.common.param.request.ShortPageReq;
import com.lq.common.param.request.UserInfoReq;
import com.lq.common.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;

/**
 * @author 权哥
 * @version 1.0
 * @date 2023/7/17 22:14
 */
@RestController
@RequestMapping("/lq/common/userinfo")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;

    /**
     * 新增系统访问记录
     * @param userInfo
     * @return
     * @throws ParseException
     */
    @PostMapping("/insert")
    public String insert(@RequestBody UserInfo userInfo) throws ParseException {
        return userInfoService.insert(userInfo);
    }

    /**
     * 用户记录
     * @param req
     * @return
     */
    @PostMapping("/findList")
    public ResponseParam findList(@RequestBody UserInfoReq req){
        return userInfoService.findList(req);
    }
}
